﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using com.eforceglobal.crux.views.Common;
using com.eforceglobal.crux.configuration;
using com.eforceglobal.crux.configuration.DTOs;
using com.eforceglobal.crux.DTOs.Configuration;

namespace com.eforceglobal.crux.controllers.Common
{
    public class ErrorController
    {
        IError _view = null;
         public ErrorController(IError view)
        {
            _view = view;
        }

        public void InitView(bool IsPostBack)
        {
            string ErrorCode = _view.ErrorCode;
            ErrorInformation errorInformation = CruxConfigurationManager.GetErrorInformation(_view.ErrorCode);
            _view.ErrorInformation = errorInformation;
        }
    }
}
